
#ifndef __LINUX_KTHREAD_H__
#define __LINUX_KTHREAD_H__

#include "linux/sched.h"
#include "linux/types.h"
#include "asm/ptrace.h"
#include "linux/errno.h"

struct task_struct *kthread_create_on_node(int (*threadfn)(void *data), void *data, int node,char namefmt[], ...);

#define kthread_create(fn, data, namefmt, ...) \
    kthread_create_on_node(fn, data, -1, namefmt, ##__VA_ARGS__)

int kthread_stop(struct task_struct *k);

#endif
